<?php
global $language, $base_url, $base_path;
$action_prefix = "/".$language->language . $base_path;
$status_label[1] = t("Draft");
$status_label[2] = t("Pedding");
$status_label[3] = t("Published");
?>

<div class="experiences-title">
  <h1><?php print t("MY EXPERIENCES");?>
  <div class="pull-right">
      <a class="btn btn-primary" href="<?php print $action_prefix ?>experiences/basic">
          <i class="icon-plus icon-white">
          </i>
          <span>
            <?php print t("Add an Experience");?>
          </span>
      </a>
  </div></h1>
</div>
<hr>
<div class="row section exp-list">
  <div class="span12">
    <?php foreach($items['data'] as $item): ?>
      <?php $img_url = image_style_url('large', $item->uri); ?>
      <ul class="thumbnails">
        <li class="span4">
            <div class="thumbnail">
                <div style="overflow: hidden; width: 290px; height: 150px;">
                  <img src="<?php print $img_url; ?>" style="width: 290px">
                </div>
            </div>
        </li>

        <div class="span8">
            <div class="text">
                <h3>
                  <?php print $item->title;?>
                </h3>
                  <?php print $item->address; ?>
            </div>
            <div class="row-fluid">
                <div class="span9">
                    <div class="buttons">
                        <a class="btn btn-small" href="<?php print $action_prefix; ?>experience/<?php print $item->nid;?>">
                            <i class="icon-eye-open">
                            </i>
                            <?php print t("View");?>
                        </a>
                        <?php if($item->status >=0 ):?>
                        <a class="btn btn-info btn-small" href="<?php print $action_prefix; ?>experiences/basic/<?php print $item->nid;?>">
                            <i class="icon-pencil icon-white">
                            </i>
                            <?php print t("Edit");?>
                        </a>
                        <?php endif;?>
                    </div>
                </div>
                <div class="span3">
                    <div class="labels">
                      <span class="label status-<?php print $item->status;?>">
                          <?php print $status_label[$item->status];?>
                        </span>
                    </div>
                </div>
            </div>
        </div>


      </ul>
    <?php endforeach; ?>
  </div>
</div>
